package com.juren.service;

import com.juren.service.fallback.SchedualServiceHelloHystric;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName HelloService
 * @Description hello接口
 * @Author zhangtao
 * @Date 2019/5/13 14:59
 * @Version 1.0
 **/
@FeignClient(value = "eureka-client",fallback = SchedualServiceHelloHystric.class)
public interface IHelloService {

    //在feign的接口中,必须加上完整的注解,否则启动失效.比如服务端的@RequestParam注解
    @GetMapping("say/helloTo")
    String test(@RequestParam(value = "name") String name);
}
